﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace FBA.Client
{
    /// <summary>
    /// App.xaml 的交互逻辑
    /// </summary>
    public partial class App : Application
    {
        /*
        protected override void OnStartup(StartupEventArgs e)
        {
            var uri1 = new Uri("/PresentationFramework.Aero, Version=v4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35;component/themes/aero.normalcolor.xaml", UriKind.Relative);
            var uri2 = new Uri("/PresentationFramework.Luna, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35;component/themes/luna.normalcolor.xaml", UriKind.Relative);
            var uri3 = new Uri("/PresentationFramework.AeroLite, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35;component/themes/aerolite.normalcolor.xaml", UriKind.Relative);


            App.Current.Resources.Source = uri2;
            base.OnStartup(e);
        }
        */
       
        protected override void OnStartup(StartupEventArgs e)
        {
            
            var uri1 = new Uri("/PresentationFramework.Aero, Version=v4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35;component/themes/aero.normalcolor.xaml", UriKind.Relative);
            var uri2 = new Uri("/PresentationFramework.Luna, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35;component/themes/luna.normalcolor.xaml", UriKind.Relative);
            var uri3 = new Uri("/PresentationFramework.AeroLite, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35;component/themes/aerolite.normalcolor.xaml", UriKind.Relative);

            //App.Current.Resources.Source = uri;
            //App.LoadComponent(uri);

            //MessageBox.Show(""+uri1.IsFile);
            /*
            App.Current.Resources = (ResourceDictionary)Application.LoadComponent(uri2);
             Application.Current.Resources.MergedDictionaries.Clear();
            */

            // Application.Current.Resources.MergedDictionaries.Add((ResourceDictionary)Application.LoadComponent(uri2));


            // 套用到整個應用程式

            base.OnStartup(e);
        }
    }

}
